<%@ page import="buscar.Busca" %>
<%@ page import="buscar.Cliente" %>

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <meta name="layout" content="main" />
        <g:set var="entityName" value="${message(code: 'veiculo.label', default: 'Veiculo')}" />
        <title><g:message code="default.show.label" args="[entityName]" /></title>
    </head>
    <body>
        <div class="nav">
            <span class="menuButton"><a class="home" href="${createLink(uri: '/')}"><g:message code="default.home.label"/></a></span>
            <span class="menuButton"><g:link class="list" action="list"><g:message code="default.list.label" args="[entityName]" /></g:link></span>
            <span class="menuButton"><g:link class="create" action="create"><g:message code="default.new.label" args="[entityName]" /></g:link></span>
        </div>
        <div class="body">
            <h1><g:message code="default.show.label" args="[entityName]" /></h1>
            <g:if test="${flash.message}">
            <div class="message">${flash.message}</div>
            </g:if>
            <div class="dialog">
                <table>
                    <tbody>
                    
                        <tr class="prop">
                            <td valign="top" class="name"><g:message code="veiculo.id.label" default="Id" /></td>
                            
                            <td valign="top" class="value">${fieldValue(bean: veiculoInstance, field: "id")}</td>
                            
                        </tr>
                        
                         <tr class="prop">
                            <td valign="top" class="name"><g:message code="veiculo.cliente.label" default="Cliente" /></td>
                            
                            <td valign="top" class="value"><g:link controller="cliente" action="show" id="${veiculoInstance?.cliente?.id}">${veiculoInstance.cliente.nome}</g:link></td>
                            
                        </tr>
                        
                        <tr class="prop">
                            <td valign="top" class="name"><g:message code="veiculo.marca.label" default="Marca" /></td>
                            
                            <td valign="top" class="value">${fieldValue(bean: veiculoInstance, field: "marca")}</td>
                            
                        </tr>
                    
                        <tr class="prop">
                            <td valign="top" class="name"><g:message code="veiculo.modelo.label" default="Modelo" /></td>
                            
                            <td valign="top" class="value">${fieldValue(bean: veiculoInstance, field: "modelo")}</td>
                            
                        </tr>
                    
                                            
                        <tr class="prop">
                            <td valign="top" class="name"><g:message code="veiculo.ano.label" default="Ano" /></td>
                            
                            <td valign="top" class="value">${fieldValue(bean: veiculoInstance, field: "ano")}</td>
                            
                        </tr>
                    
                        <tr class="prop">
                            <td valign="top" class="name"><g:message code="veiculo.valor.label" default="Valor" /></td>
                            
                            <td valign="top" class="value">${fieldValue(bean: veiculoInstance, field: "valor")}</td>
                            
                        </tr>
                    
                        <tr class="prop">
                            <td valign="top" class="name"><g:message code="veiculo.cor.label" default="Cor" /></td>
                            
                            <td valign="top" class="value">${fieldValue(bean: veiculoInstance, field: "cor")}</td>
                            
                        </tr>
                    
                                          
                        <tr class="prop">
                            <td valign="top" class="name"><g:message code="veiculo.alarme.label" default="Alarme" /></td>
                            
                            <td valign="top" class="value"><g:formatBoolean boolean="${veiculoInstance?.alarme}" /></td>
                            
                        </tr>
                    
                        <tr class="prop">
                            <td valign="top" class="name"><g:message code="veiculo.arCondicionado.label" default="Ar Condicionado" /></td>
                            
                            <td valign="top" class="value"><g:formatBoolean boolean="${veiculoInstance?.arCondicionado}" /></td>
                            
                        </tr>
                    
                        <tr class="prop">
                            <td valign="top" class="name"><g:message code="veiculo.cambioAutomatico.label" default="Cambio Automatico" /></td>
                            
                            <td valign="top" class="value"><g:formatBoolean boolean="${veiculoInstance?.cambioAutomatico}" /></td>
                            
                        </tr>
                    
                                           
                        <tr class="prop">
                            <td valign="top" class="name"><g:message code="veiculo.direcaoHidraulica.label" default="Direcao Hidraulica" /></td>
                            
                            <td valign="top" class="value"><g:formatBoolean boolean="${veiculoInstance?.direcaoHidraulica}" /></td>
                            
                        </tr>
                    
                        <tr class="prop">
                            <td valign="top" class="name"><g:message code="veiculo.quatroPorQuatro.label" default="Quatro Por Quatro" /></td>
                            
                            <td valign="top" class="value"><g:formatBoolean boolean="${veiculoInstance?.quatroPorQuatro}" /></td>
                            
                        </tr>
                    
                        <tr class="prop">
                            <td valign="top" class="name"><g:message code="veiculo.quatroPortas.label" default="Quatro Portas" /></td>
                            
                            <td valign="top" class="value"><g:formatBoolean boolean="${veiculoInstance?.quatroPortas}" /></td>
                            
                        </tr>
                    
                        <tr class="prop">
                            <td valign="top" class="name"><g:message code="veiculo.sensorDeEstacionamento.label" default="Sensor De Estacionamento" /></td>
                            
                            <td valign="top" class="value"><g:formatBoolean boolean="${veiculoInstance?.sensorDeEstacionamento}" /></td>
                            
                        </tr>
                    
                        <tr class="prop">
                            <td valign="top" class="name"><g:message code="veiculo.som.label" default="Som" /></td>
                            
                            <td valign="top" class="value"><g:formatBoolean boolean="${veiculoInstance?.som}" /></td>
                            
                        </tr>
                    
                        <tr class="prop">
                            <td valign="top" class="name"><g:message code="veiculo.travasEletricas.label" default="Travas Eletricas" /></td>
                            
                            <td valign="top" class="value"><g:formatBoolean boolean="${veiculoInstance?.travasEletricas}" /></td>
                            
                        </tr>
                    
                        <tr class="prop">
                            <td valign="top" class="name"><g:message code="veiculo.vidrosEletricos.label" default="Vidros Eletricos" /></td>
                            
                            <td valign="top" class="value"><g:formatBoolean boolean="${veiculoInstance?.vidrosEletricos}" /></td>
                            
                        </tr>
                    
                    </tbody>
                </table>
            </div>
            
            <div>
            
            <td valign="top" class="value"><a href="http://localhost:8080/buscar/mensagem/list/${(veiculoInstance.cliente.email)}">Enviar email</a></td>
          
            </div>
            <div>
             <td valign="top" class="value"><a href="http://localhost:8080/buscar/financiamento/">Financiamento</a></td>
           
            </div>
            
            <div class="buttons">
                <g:form>
                    <g:hiddenField name="id" value="${veiculoInstance?.id}" />
                    <span class="button"><g:actionSubmit class="edit" action="edit" value="${message(code: 'default.button.edit.label', default: 'Edit')}" /></span>
                    <span class="button"><g:actionSubmit class="delete" action="delete" value="${message(code: 'default.button.delete.label', default: 'Delete')}" onclick="return confirm('${message(code: 'default.button.delete.confirm.message', default: 'Are you sure?')}');" /></span>
                </g:form>
            </div>
        </div>
    </body>
</html>
